
import dao.DaoEscola;
import java.util.List;
import javax.swing.JOptionPane;
import model.Escola;
import model.Materia;
import model.Serie;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author ronaldomartins
 */
public class TesteConsulta {
    public static void main(String args[]){
        DaoEscola daoEscola = new DaoEscola();
        List<Escola> escolas = daoEscola.listarTodos();
        for(Escola e: escolas){
            JOptionPane.showMessageDialog(null, e.getNome());
            List<Serie> series = e.getSeries();
            for(Serie s: series){
                JOptionPane.showMessageDialog(null, s.getDescricao());
                List<Materia> materias =  s.getMaterias();
                for(Materia m: materias){
                    JOptionPane.showMessageDialog(null, m.getNome());
                }
            }
        }
    }
}
